/*

Write a program that reads an arbitary number of files whose names are given as command-line arguments and writes them one after another on cout. Because this program concatenates its arguments to produce its output, you might call it cat.*/
#include <iostream>
#include <fstream>
using namespace std;

int main(int argc, char const *argv[])
{
    if (argc==1)cout<<"Please enter file names!"<<endl;
    if (argc>1){
        for (int i = 1; i < argc ; i++)
        {
            ifstream in(argv[i]);
            if(!in){
                cout<<"Error! "<<argv[i]<<" Cannot find this file!\n";
                return 0;
            }
            char ch;
            while (in.get(ch))
            {
                
                cout<<ch;
            }
            in.close();
        }
    }
    return 0;
}
